import { Controller, Inject, Get } from '@nestjs/common';
import { UserService } from './user.service';
import { Logger } from 'winston';

@Controller('user')
export class UserController {
  constructor(
    // 依赖注入
    @Inject('WINSTON_LOGGER') private logger: Logger,
    private readonly userService: UserService,
  ) {}
  @Get()
  findAll() {
    this.logger.info('这里是User日志：Hello, World!');
    return this.userService.findAll();
  }
}
